{% extends "index.html" %}
{% block title %}字母拼写{% endblock %}
{% block script %}
    <script>
        function check(o) {
            var tem = o.id;
            var val = o.value
            if (tem === val){
                $("#"+tem+'check').attr("class","form-group has-success")
            }else {
                $("#"+tem+'check').attr("class","form-group has-error")
            }
        }
    </script>
{% endblock %}
{% block style %}{% endblock %}
{% block side %}
    <div class="container">
        <div class="row">
            {% for mydict in data %}
                <div class="col-md-3">
                    <div class="form-group" id="{{ mydict.word }}check">
                        <label class="control-label" for="{{ mydict.word }}"><h2>{{ mydict.tips }}&nbsp;&nbsp;<small>中第{{ mydict.site }}个拼音</small></h2></label>
                        <input type="text" class="form-control" id="{{ mydict.word }}" onblur="check(this)">
                    </div>
                </div>
            {% endfor %}
        </div>
    </div>
{% endblock %}